import { AxiosPromise } from 'axios';
import { EventAssetsVo, EventAssetsQuery, EventManagerConfigsVo } from './types';
import request from '@/utils/request';

export const getEventAllAssetsList = (query: EventAssetsQuery): AxiosPromise<EventAssetsVo[]> => {
  return request({
    url: '/oce/third/getEventAllAssetsList',
    method: 'get',
    params: query
  });
};

export const getEventManagerConfigs = (query: EventAssetsQuery): AxiosPromise<EventManagerConfigsVo[]> => {
  return request({
    url: '/oce/third/getEventManagerConfigs',
    method: 'get',
    params: query
  });
};
export const getMicroMicroAppList = (query: EventAssetsQuery): AxiosPromise<EventManagerConfigsVo[]> => {
  return request({
    url: '/oce/microApp/list',
    method: 'get',
    params: query
  });
};
export const addCreateEventManagerAssets = (query: EventAssetsQuery): AxiosPromise<EventManagerConfigsVo[]> => {
  return request({
    url: '/oce/third/createEventManagerAssets',
    method: 'post',
    data: query
  });
};
export const addCreateEventManagerEvents = (query: EventAssetsQuery): AxiosPromise<EventManagerConfigsVo[]> => {
  return request({
    url: '/oce/third/createEventManagerEvents',
    method: 'post',
    data: query
  });
};
export const getEventManagerAvailableEventsList = (query: EventAssetsQuery): AxiosPromise<EventManagerConfigsVo[]> => {
  return request({
    url: '/oce/third/getEventManagerAvailableEventsList',
    method: 'get',
    params: query
  });
};
export const getQueryToolsMicroAppNew = (query: EventAssetsQuery): AxiosPromise<EventManagerConfigsVo[]> => {
  return request({
    url: '/oce/third/queryToolsMicroAppNew',
    method: 'get',
    params: query
  });
};
